package com.kuang.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kuang.domain.entity.User;
import com.kuang.mapper.OrdersMapper;
import com.kuang.mapper.UserMapper;
import com.kuang.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName UserServiceImpl
 * @Description TODO
 * @Author Augenestern_QXL
 * @Version 1.0
 */
@Service
public class UserServiceImpl  extends ServiceImpl<UserMapper, User>  implements UserService {


    /**
     * 如果我们需要其他的Mapper,仍然需要注入
     */
    @Resource
    private OrdersMapper ordersMapper;

    @Override
    public User MyUser() {
        /**
         * 就不需要注入 UserMapper 了, 直接调用 getBaseMapper 可以获得UserMapper
         * 因为我们 extends ServiceImpl<UserMapper, User> 继承了 ServiceImpl , 底层通过反射获取 UserMapper
         */

        UserMapper userMapper = getBaseMapper();
        return null;
    }
}





















